import request from "@/utils/request";
import type {AjaxResult,page} from "@/utils/request"

const base = '/base/problemList'
/**
 * 获取题单列表
 * @returns Promise
 */
export const getProblemList = (data,params?:page) : Promise<AjaxResult> => {
    return request({
        url: `${base}/list`,
        method: 'post',
        params: params,
        data:data
    })
}

/**
 * 获取题单详情
 * @returns Promise
 */
export const getProblemListDetails = (id : string ,pwd? : string) : Promise<AjaxResult> => {
    return request({
        url: `${base}/query/${id}`,
        method: 'get',
        params: {"pwd" : pwd || ''},
    })
}
